using System.Collections.Generic;
using Headsight.BPMN2WF.BPMN.Model;
using Headsight.BPMN2WF.Testing.TestObjCtors;
using Headsight.BPMN2WF.Transformation.Transformers.Additions;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Rhino.Mocks;

namespace Headsight.BPMN2WF.Transformation.Transformers.NoGoodName
{
    [TestClass]
    public class BPMN2WFTransformationLayouterTest : BPMN2WFTransformationDelegateBaseImplTestFixture<BPMN2WFTransformationLayouter>
    {
        private BPMNFlowNode _flowNode;
        private BPMNTransformationResult _result;

        protected override BPMN2WFTransformationLayouter CreateSut(IBPMN2WFTransformation @delegate)
        {
            _ctx = new BPMN2WFTransformationContextCtor().Create();
            _flowNode = new BPMNFlowNodeCtor().Create();

            _result = new BPMNTransformationResultCtor().Create();

            return new BPMN2WFTransformationLayouter(@delegate, new Dictionary<string, BPMNElementVisual>());
        }

        [TestMethod]
        public void Transform()
        {
            _delegate.Expect(x => x.Transform(_ctx, _flowNode)).Return(_result);

            Assert.AreSame(_result, _sut.Transform(_ctx, _flowNode));
        }
    }
}